﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Foundation {
    [DataContract]
    public class SoundSuite {
        private string adventure = null;
        private string name = null; 


        /// <summary>
        /// ID der Suite
        /// </summary>
        [DataMember]
        public Guid Id { get; set; }

        /// <summary>
        /// Namen der SoundSuite
        /// </summary>
        [DataMember]
        public string Name {
            get {
                return this.name == null ? string.Empty : this.name;
            }
            set {
                this.name = value;
            }
        }


        /// <summary>
        /// Name des Abenteuers
        /// </summary>
        [DataMember]
        public string Adventure {
            get {
                if (this.adventure == null) {
                    return string.Empty;
                }
                else {
                    return this.adventure;
                }
            }
            set {
                this.adventure = value;
            }
        }

        /// <summary>
        /// Die Effekt Gruppen, welche in der SoundSuite gespeichert sind
        /// </summary>
        [DataMember]
        public List<EffectGroup> EffectGroups { get; private set; }



        /// <summary>
        /// Konstruktor, welcher eine neue SoundSuite erstellt
        /// </summary>
        /// <param name="name">Der Name der Soundsuite</param>
        public SoundSuite(string name) {
            this.Name = name;
            this.Id = Guid.NewGuid();
            this.EffectGroups = new List<EffectGroup>();
        }

        /// <summary>
        /// Gibt die String Repres
        /// </summary>
        /// <returns></returns>
        public override string ToString() {
            return string.IsNullOrEmpty(this.Name)? base.ToString() : this.Name; 
        }
    }
}
